package com.yequan.thread.pc.threadpool.blockingqueue;

import com.yequan.thread.threadpool.plan.ThreadPoolManager;

import java.util.concurrent.LinkedBlockingQueue;

/**
 * @author yequan
 * @date 2019/11/29
 */
public class TestThreadPoolManager {

    public static void main(String[] args) {
        LinkedBlockingQueue queue = new LinkedBlockingQueue(3);
        Producer myProvider = new Producer(queue);
        Consumer myConsumer = new Consumer(queue);

        ThreadPoolManager instance = ThreadPoolManager.getInstance();

        instance.addExecuteTask(myProvider);

        instance.addExecuteTask(myConsumer);
        instance.addExecuteTask(myConsumer);
        instance.addExecuteTask(myConsumer);

    }

}
